import { EzFormControlComponent } from '../ez-form-control';
import { EzSwitchConfiguration } from './ez-switch.configuration';
import { EzSwitch } from './ez-switch';
import { OnInit, OnDestroy, Component } from '@angular/core';
import { EzFormComponent } from '../ez-form';
import { EzFormGroupComponent } from '../ez-form-group';
import { EzFormItemComponent } from '../ez-form-item';

@Component({
  selector: 'ez-switch',
  templateUrl: './ez-switch.component.html',
  styleUrls: ['./ez-switch.component.less'],
  providers: [
    {
      provide: EzFormControlComponent,
      useExisting: EzSwitchComponent,
    },
  ],
})
export class EzSwitchComponent extends EzFormControlComponent<EzSwitchConfiguration, boolean>
  implements EzSwitch, OnInit, OnDestroy {
  constructor(
    protected ezForm: EzFormComponent,
    protected ezFormGroup: EzFormGroupComponent,
    protected ezFormItem: EzFormItemComponent
  ) {
    super(ezForm, ezFormGroup, ezFormItem);
  }

  ngOnInit(): void {
    super.ngOnInit();
  }

  checkConfiguration(configuration: EzSwitchConfiguration): void {}
}
